package com.jiangnan.model;

import java.io.Serializable;

/**
 *
 * 这个模型是用来解析获取到的数据包
 *
 * 由于原版的packet获取数据较少，因此在这里给自己需要的数据进一步封装
 *
 * @author chenliang
 * @email wschenliang@aliyun.com
 */
public class PacketModel implements Serializable {
    private static final long serialVersionUID = -1019130097748038406L;

    private long time;
    private int caplen;
    private String payload;
    private String proto;
    public static final String PROTO_TCP = "eth.ip.tcp";
    public static final String PROTO_UDP = "eth.ip.udp";
    public static final String PROTO_ARP = "eth.ip.arp";
    public static final String PROTO_ICMP = "eth.ip.icmp";
    private String src_mac;
    private String dst_mac;
    private String src_ip;
    private String dst_ip;
    private String src_area;
    private String dst_area;
    private int src_port;
    private int dst_port;
    private int payload_len;
    private short ethType;

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    public int getCaplen() {
        return caplen;
    }

    public void setCaplen(int caplen) {
        this.caplen = caplen;
    }

    public String getPayload() {
        return payload;
    }

    public void setPayload(String payload) {
        this.payload = payload;
    }

    public String getProto() {
        return proto;
    }

    public void setProto(String proto) {
        this.proto = proto;
    }

    public String getSrc_mac() {
        return src_mac;
    }

    public void setSrc_mac(String src_mac) {
        this.src_mac = src_mac;
    }

    public String getDst_mac() {
        return dst_mac;
    }

    public void setDst_mac(String dst_mac) {
        this.dst_mac = dst_mac;
    }

    public String getSrc_ip() {
        return src_ip;
    }

    public void setSrc_ip(String src_ip) {
        this.src_ip = src_ip;
    }

    public String getDst_ip() {
        return dst_ip;
    }

    public void setDst_ip(String dst_ip) {
        this.dst_ip = dst_ip;
    }

    public String getSrc_area() {
        return src_area;
    }

    public void setSrc_area(String src_area) {
        this.src_area = src_area;
    }

    public String getDst_area() {
        return dst_area;
    }

    public void setDst_area(String dst_area) {
        this.dst_area = dst_area;
    }

    public int getSrc_port() {
        return src_port;
    }

    public void setSrc_port(int src_port) {
        this.src_port = src_port;
    }

    public int getDst_port() {
        return dst_port;
    }

    public void setDst_port(int dst_port) {
        this.dst_port = dst_port;
    }

    public int getPayload_len() {
        return payload_len;
    }

    public void setPayload_len(int payload_len) {
        this.payload_len = payload_len;
    }

    public short getEthType() {
        return ethType;
    }

    public void setEthType(short ethType) {
        this.ethType = ethType;
    }
}
